home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / comm / comm1 / cnet_who.lha / who / Upgrade266 < prev    next >
Text File  |  1996-12-08  |  2KB  |  49 lines

  1. /**************************************************************************\
  2.             $VER: Upgrade CNet WHO to v2.66 (from 2.00 forward)
  3. \**************************************************************************/
  4. options results;signal on SYNTAX;signal on ERROR;signal on IOERR;ver="2.66"
  5. tr=transmit ; se=sendstring ; gc=getchar ; gu=getuser ; gs=getscratch
  6. a='rexxsupport.library';if ~show('l',a) then if ~addlib(a,0,-30) then exit
  7.  
  8. se "n1Converting CNet Amiga Who config file to "ver"...n2"
  9.  
  10. se "You must FIRST be using CNet Amiga Who, v2.65 BEFORE using this update "
  11. se "script. Alright to continue? [No]: ";gc;a=result
  12. if a~="Y" then do;tr "No.";exit;end;else tr "Yes!"
  13.  
  14. gu 1311992 ; dp=result ; cfg=dp"Config.data"
  15.  
  16. if ~exists(a) then do
  17.   se "n2I could not locate the `Config.data' file. This upgrade script "
  18.   se "should be located inside the `Who/' directory before being used "
  19.   tr "for the first time.n1" ; exit ; end
  20.  
  21. call open(f1,dp"MakeWho","r");do 2;a=readln(f1);end;call close(f1)
  22. if word(a,3)~="v2.65" then do
  23.   se "n2According to your `MakeWho' file, you are NOT running version 2.65 "
  24.   se "of CNet Amiga Who, but in fact are using "word(a,3)". Please install "
  25.   se "v2.65 fully before continuing...n1" ; exit ; end
  26.  
  27. se "Converting CTRL-A's in the `Config.data' file to CTRL-S's..."
  28.  
  29.     call open(f1,cfg,"r")
  30.     call open(f2,cfg"2","w")
  31.       do i=1 until eof(f1)
  32.         a=readln(f1)
  33.         call writeln(f2,translate(a,"",""))
  34.       end i
  35.     call close(f2)
  36.     call close(f1)
  37.     address command "delete "cfg ; address command "rename "cfg"2 "cfg
  38.  
  39. tr "Completed!n1"
  40.  
  41. exit
  42. SYNTAX:;ERROR:;IOERR:;e1=' Error: 'rc' ('errortext(rc)')'
  43.   e2='  Line: 'left(sigl,4)'File:';gu 1311992;a=result;gu 1311960
  44.   b=result;c='"'a||b'"';e2=e2' 'c;tr e1;tr e2;logentry e1;logentry e2
  45.   e=translate(sourceline(sigl),"\{","");do while e~=''
  46.   e3='Source: 'left(e,37);tr e3;logentry e3;e=substr(e,38);end;bufferflush
  47. /**************************************************************************|
  48. \****************************************** Frontiers BBS (716)/823-9892 **/
  49.